﻿using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Text;
using appladen.contracts;

namespace appladen.txtfileadapter
{
    public class Zeilen_lesen : IZeilen_lesen
    {
        private ITxtFileAdapter txtFileAdapter;
        public void Process(string dateiname)
        {
            Trace.TraceInformation("Zeilen_lesen - Process");
            Result(txtFileAdapter.ReadAllLines(dateiname));
        }

        public event Action<IEnumerable<string>> Result;

        public void Inject(ITxtFileAdapter independent)
        {
            Trace.TraceInformation("Zeilen_lesen - Inject");
            txtFileAdapter = independent;
        }
    }
}
